<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template name="tv-detail">

<!-- BEGIN TV DETAILS PAGE CODE HERE -->

<body bgproperties="fixed" bgcolor="#000000" onloadset="Play" onload="init()" focustext="#ffffff" FOCUSCOLOR="transparent">
<xsl:attribute name="onloadset"><xsl:value-of select="//index[@current='true']/@name"/></xsl:attribute>
<xsl:attribute name="background"><xsl:value-of select="concat(baseFilename,concat($fanart.scanner.fanartToken,'.jpg'))"/></xsl:attribute>


<table width="1102" height="656" border="0" cellspacing="0" cellpadding="0" background="pictures/sabishmod/tvbg.png">
<tr>
<td valign="top">

<!-- 1ere TABLE -->

<table width="100%" border="0">
<tr height="50" valign="bottom">
                <td width="18"></td>

<td width="250"><!--<xsl:attribute name="class">title</xsl:attribute>&#160;&#160;<xsl:value-of select="title"/>-->
	 <img width="244" height="45">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+4"/></xsl:attribute>
				<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+4"/>)</xsl:attribute>
				<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+4"/>)</xsl:attribute>
				<xsl:attribute name="onfocus">banner(<xsl:value-of select="position()+4"/>,'visible');</xsl:attribute>
				<xsl:attribute name="onblur">banner(<xsl:value-of select="position()+4"/>,'hidden');</xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/wall/transbanner.png</xsl:attribute>
				</img>
                </td>
                <td width="10"></td>
                <td align="left">						
			<xsl:if test="rating != -1">
              <xsl:if test="$star_rating = 'true'">
                <img hspace="10" vspace="6" ><xsl:attribute name="src">pictures/detail/rating_tv_<xsl:value-of select="round(rating div 10)*10" />.png</xsl:attribute>
				</img>
              </xsl:if>
            </xsl:if>
					</td>
                   <!-- <td align="right" valign="middle">
                   <img width="244" height="45">
				<xsl:choose><xsl:when test="$tv-banners-file='true'"><xsl:attribute name="src"><xsl:value-of select="bannerFile"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="src"><xsl:value-of select="bannerURL"/></xsl:attribute></xsl:otherwise></xsl:choose>
				<xsl:attribute name="id">banner<xsl:value-of select="position()+4"/></xsl:attribute>
				<xsl:attribute name="onmouseover">show(<xsl:value-of select="position()+4"/>)</xsl:attribute>
				<xsl:attribute name="onmouseout">hide(<xsl:value-of select="position()+4"/>)</xsl:attribute>
				<xsl:attribute name="onfocus">banner(<xsl:value-of select="position()+4"/>,'visible');</xsl:attribute>
				<xsl:attribute name="onblur">banner(<xsl:value-of select="position()+4"/>,'hidden');</xsl:attribute>
				<xsl:attribute name="onfocussrc">pictures/transbanner.png</xsl:attribute>
				</img>
                    </td>
                    <td width="6"></td>-->
                    
           
					
</tr>
</table>

<!-- FIN 1ere TABLE -->


</td>
</tr>

<tr>
<td>

<!-- 2eme TABLE -->


<table width="100%" border="0">

<tr>

<td width="400">
<table width="100%" border="0">
<tr>
       <td align="center" valign="center">
							<xsl:attribute name="class">year</xsl:attribute>
							<xsl:if test="season &gt; 0">S<xsl:value-of select="season" /></xsl:if>
							<xsl:if test="season = 0">Sp</xsl:if>
						</td>
                        
                        <td align="center" valign="center">
							<xsl:if test="year != 'UNKNOWN'">
								<xsl:attribute name="class">year</xsl:attribute>
							  <xsl:choose>
								<xsl:when test="year/@index != ''">
									<xsl:value-of select="year" />
								</xsl:when>
								<xsl:otherwise>
								  <xsl:value-of select="year" />
								</xsl:otherwise>
							  </xsl:choose>
							</xsl:if>
						</td>
</tr>
                        <tr>
                        <td height="27" valign="bottom" colspan="2">
            <xsl:if test="count(genres) != 0">
				<xsl:attribute name="class">gray</xsl:attribute>
              <xsl:for-each select="genres/genre[position() &lt;= $genres.max]">&#160;&#160;&#160;
                <xsl:if test="position()!= 1"> / </xsl:if>
                <xsl:choose>
                  <xsl:when test="@index != ''">
                      <xsl:value-of select="." /> 
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:value-of select="." /> 
                  </xsl:otherwise>
                </xsl:choose>
              </xsl:for-each>
            </xsl:if>
			</td>
		</tr>

<tr>
<td height="10" colspan="2"></td>
</tr>


<tr>
<td width="160"></td>
<td width="240" height="415" valign="top">
	<xsl:if test="count(cast/actor) != 0">
              <xsl:for-each select="cast/actor[position() &lt;= $actors.max]">
			  <table border="0" cellpadding="0" cellspacing="0"><tr><td><xsl:attribute name="class">plot</xsl:attribute>
                <xsl:if test="position()!=1">  </xsl:if>
                <xsl:choose>
                  <xsl:when test="@index != ''">
                      <xsl:value-of select="." /> 
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:value-of select="." /> 
                  </xsl:otherwise>
                </xsl:choose>
				</td></tr></table>
              </xsl:for-each>
			</xsl:if>
</td>
</tr>

<tr>
<td colspan="2">
	<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
					<tr valign="middle">
                    <td width="10"></td>
                    <td width="105" align="center"><xsl:attribute name="class">plot</xsl:attribute><xsl:call-template name="videoCodec" />
					</td>
					<td width="150" align="center"><xsl:attribute name="class">plot</xsl:attribute><xsl:call-template name="audioCodec" />
					</td>
				
					<td width="90" align="center"><xsl:attribute name="class">plot</xsl:attribute><xsl:call-template name="videoOutput" />
					</td>
					</tr>
				</table>
                </td>
                </tr>
                
                <tr>
<td height="37" colspan="2"></td>
</tr>

</table>            
            
</td>



<td width="415" height="100%">

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="episodenInfos" class="hidden">
	 <tr><td height="50" id="episodeName" class="episodeNameSabish" valign="top" align="left"><xsl:attribute name="class">multi</xsl:attribute>&#160; </td></tr>
    	<tr><td height="245"></td></tr>
       

		<tr><td id="episodeId" class="episodeID" align="left" valign="top" height="243"><xsl:attribute name="class">plot</xsl:attribute>&#160; </td></tr>
		<!--<tr><td height="20"></td></tr>-->
	</table>

</td>

<td width="35"></td>
<td width="250" valign="top">
<table>
<tr>
<td height="32"></td>
</tr>
<tr>
<td>

    	<xsl:if test="$doReverseEpisodes = 'true'">
				<xsl:for-each select="files/file/filePlot">
					 <xsl:sort select="position()" data-type="number" order="descending"/>
					<xsl:if test="position() &lt;= $iEpisodesPerPage">
						<xsl:call-template name="getEpisodeList">
							<xsl:with-param name="position" select="position()" />
						</xsl:call-template>
					</xsl:if>


				</xsl:for-each>
			</xsl:if>
			<xsl:if test="$doReverseEpisodes != 'true'">
				<xsl:for-each select="files/file/filePlot">
					<xsl:if test="position() &lt;= $iEpisodesPerPage">
						<xsl:call-template name="getEpisodeList">
							<xsl:with-param name="position" select="position()" />
						</xsl:call-template>
					</xsl:if>
				</xsl:for-each>
			</xsl:if>
            
		 </td>
         </tr>
         </table>  		
           
           </td>

		   </tr>
           
           </table>
 
         
                </td>

		   </tr>
           
           </table>
 
         
      



       				<a>
                    
        		    <xsl:attribute name="id">openEpisode</xsl:attribute>
        				<xsl:attribute name="TVID">Play</xsl:attribute>
        		    <xsl:attribute name="href">#</xsl:attribute>
        		    <xsl:attribute name="vod"></xsl:attribute>
        		 	</a>

        		 	<a href="#" onclick="return  toggleEpisodeDetails();" tvid="{$show-hide-episode-plot}"></a>

      <div id="plotInfo" class="abs plotInfoSabish tabPlot">&#160;</div>

      <xsl:if test="$tooManySeries = 'true'">
        <div id="pageCount" class="abs plotInfoSabish tabTvShow">&#160;</div>
			</xsl:if>

			<div id="episodePages" class="abs episodePagesSabish tabTvShow">&#160;</div>

      <xsl:if test="season != -1  and $mjb.includeVideoImages='true' ">
      <div id="divEpisodeImgBackSabish" class="abs">
        <img src="pictures/sabishmod/epi_back.png" width="430" id="episodeImgBack" class="hidden" />
      </div>
      <div id="divEpisodeImgSabish" class="abs">
	  		<img src="pictures/wall/wall/transparent.png" width="400" id="episodeImg" class="hidden" />
      </div>
      <!--<div id="divEpisodeImgBack" class="abs">
        <img src="pictures/noprev.png" height="225" width="400" id="episodeImgBack" class="hidden" />
      </div>
      <div id="divEpisodeImg" class="abs">
	  		<img src="pictures/noprev.png" height="225" width="400" id="episodeImg" class="hidden" />
      </div>-->
      </xsl:if>

 </body>


<!-- END TV DETAILS PAGE CODE HERE -->

</xsl:template>
</xsl:stylesheet>